ExpressionFormula
Ecng.Compilation.Expressions
Compiled mathematical formula.
Constructores
ExpressionFormula
protected ExpressionFormula(string expression, IEnumerable<string> variables)
expressionFormula = ExpressionFormula(expression, variables)
Initializes a new instance of the ExpressionFormula.
- expression
- Mathematical formula.
- variables
- Variables.
Propiedades
Expression
public string Expression { get; }
value = expressionFormula.Expression
Mathematical formula.
Variables
public IEnumerable<string> Variables { get; }
value = expressionFormula.Variables
Variables.
Métodos
Calculate
public abstract TResult Calculate(decimal[] values)
result = expressionFormula.Calculate(values)
To calculate the basket value.
- values
- Inner values.
Devuelve: The basket value.
CreateError
public static ExpressionFormula<TResult> CreateError(string errorText)
result = ExpressionFormula.CreateError(errorText)
Create a error stub.
- errorText
- The error text.
Devuelve: The stub.
ToString
public override string ToString()
result = expressionFormula.ToString()
Returns a string representation of the tuple, with values separated by commas.
Devuelve: A string representing the tuple's values.